<?php

namespace Admin\Controller;

class IndexController extends AdminBase {


    public function index(){

        $this->assign('menu',D('Menu','Logic')->getMenu());

        $this->assign('nickname',self::$userinfo['nickname']);
        $this->display('Index:index');

    }

    public function welcome(){

        $info = array(
            '系统名称'=>'CYcms管理系统',
            '系统版本'=>'v'.C('LDH_VERSION'),
            '操作系统'=>PHP_OS,
            '运行环境'=>$_SERVER["SERVER_SOFTWARE"],
            'PHP运行方式'=>php_sapi_name(),
            'ThinkPHP版本'=>THINK_VERSION,
            '上传附件限制'=>ini_get('upload_max_filesize'),
            '执行时间限制'=>ini_get('max_execution_time').'秒',
            '服务器时间'=>date("Y年n月j日 H:i:s"),
            '北京时间'=>gmdate("Y年n月j日 H:i:s",time()+8*3600),
            '服务器域名/IP'=>$_SERVER['SERVER_NAME'].' [ '.gethostbyname($_SERVER['SERVER_NAME']).' ]',
            '剩余空间'=>round((disk_free_space(".")/(1024*1024)),2).'M',
        );
        $this->assign('info',$info);
        $this->assign(self::$userinfo);
        $this->display();
    }

    public function _empty(){


       $this->display('Public:404');
    }
    //推出登陆
    public function logout(){
        session('ldh_userid',null);

        $this->redirect('Public/login');

    }
    /*清除缓存*/
    public function clear_cahe(){


        $this->display();
    }

}